Problem: The real function $f$ has the property that, whenever $a,$ $b,$ $n$ are positive integers such that $a + b = 2^n,$ the equation
\[f(a) + f(b) = n^2\]holds.  What is $f(2002)$?
Solution: From the given property,
\begin{align*}
f(2002) &= 11^2 - f(46), \\
f(46) &= 6^2 - f(18), \\
f(18) &= 5^2 - f(14), \\
f(14) &= 4^2 - f(2).
\end{align*}Also, $f(2) + f(2) = 4,$ so $f(2) = 2.$  Hence,
\begin{align*}
f(14) &= 4^2 - 2 = 14, \\
f(18) &= 5^2 - 14 = 11, \\
f(46) &= 6^2 - 11 = 25, \\
f(2002) &= 11^2 - 25 = \boxed{96}.
\end{align*}